MySQL - Create Database
A database is a collection of data. MySQL allows us to store and retrieve the data from the database in a efficient way. In MySQL, we can create a database using the CREATE DATABASE statement. But, if database already exits, it throws an error. To avoid the error, we can use the IF NOT EXISTS option with the CREATE DATABASE statement.
You would need special privileges to create or to delete a MySQL database. So assuming you have access to the root user, you can create any database using the mysql mysqladmin binary.
Example
Here is a simple example to create a database called TUTORIALS
[root@host]# mysqladmin -u root -p create TUTORIALS
Enter password:******
This will create a MySQL database called TUTORIALS.
MySQL - Grant_ Revoke Privilege
posted on 2019-11-26 23:15:04 - mysql Tutorials